package cn.edu.buaa.cnsatm.traffic_big_data_server.waterway.model;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

/**
 * @name = LX
 * @classname = SeaStatusModel
 * @description = 海况实体
 * @date = 2019/10/19
 */
public class SeaStatusModel {
    String sea_area_name;
    Double wave_height;
    Integer wave_direction;
    Integer wave_height_level;
    Double cycle;
    Double sea_temp;
    String start_time;
    public SeaStatusModel(JSONObject seaStatusJson){
        /**
         * @name = LX
         * @classname = SeaStatusModel
         * @description = 构造函数，将网页上爬取的json转成java实体
         * @date = 2019/10/19
         */
        this.sea_area_name = seaStatusJson.getString("code");
        this.wave_height = seaStatusJson.getDouble("waveHeight");
        this.start_time = seaStatusJson.getString("bizDate");
        this.wave_direction = seaStatusJson.getInteger("waveDirection");
        this.cycle = seaStatusJson.getDouble("cycle");
        this.sea_temp = seaStatusJson.getDouble("seaTemp");
    }
    public SeaStatusModel(String sea_area_name, Double wave_height, Integer wave_direction, Integer wave_height_level, Double cycle, Double sea_temp, String start_time) {
        this.sea_area_name = sea_area_name;
        this.wave_height = wave_height;
        this.wave_direction = wave_direction;
        this.wave_height_level = wave_height_level;
        this.cycle = cycle;
        this.sea_temp = sea_temp;
        this.start_time = start_time;
    }

    public String getSea_area_name() {
        return sea_area_name;
    }

    public Double getWave_height() {
        return wave_height;
    }

    public Integer getWave_direction() {
        return wave_direction;
    }

    public Integer getWave_height_level() {
        return wave_height_level;
    }

    public Double getCycle() {
        return cycle;
    }

    public Double getSea_temp() {
        return sea_temp;
    }

    public String getStart_time() {
        return start_time;
    }

    public void setWave_height_level(Integer wave_height_level) {
        this.wave_height_level = wave_height_level;
    }
}
